package com.quik.system.taglib;

import java.util.Iterator;
import java.util.List;

import com.quik.entity.SysSystemCode;

/**
 * 功能说明：
 *        字符串处理标签
 * @author jenny
 *
 */
public class StringTag {
	public static String getValueByKey(List list, String key){
		String value = "";
		
		try{
			if(list != null && !list.isEmpty()){
				for(Iterator its = list.iterator(); its.hasNext();){
					SysSystemCode code = (SysSystemCode)its.next();
					if(code.getCode().equals(key)){
						value = code.getName();
						break;
					}
				}
			}
		}catch(Exception e){
			e.printStackTrace();
		}
		
		return value;
	}
}
